/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package exporter;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *
 * @author user
 */
public class Writter {

    FileOutputStream fos;

    public Writter(File arquivo) throws FileNotFoundException {
        fos=new FileOutputStream(arquivo);
    }

    public void write(int tamanho, String Texto) throws IOException{

        fos.write(Texto.getBytes(),0, tamanho);
        //fos.flush();
    }
        public void write(int tamanho, String Texto,String sufixo) throws IOException{
        while(tamanho>=Texto.length()){
            Texto=Texto.concat(sufixo);
        }
        fos.write(Texto.getBytes(), 0, tamanho);
        //fos.flush();
    }

}
